home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 June (Extra) / CHIP 2006-06.3.iso / program / opensource / clamav-devel.exe / sosdg / clamav-install < prev    next >
Encoding:
Text File  |  2006-05-16  |  1.7 KB  |  45 lines

  1. #!/bin/bash
  2. CLAMAV=/cygdrive/c/clamav-devel
  3. WINPATH=C:/clamav-devel
  4. MNTPATH=/mnt/clamav
  5. DOCFILES="NEWS README TODO BUGS AUTHORS ChangeLog FAQ INSTALL"
  6. DOCDIR="docs examples contrib test"
  7. DLLFILES="/bin/cygwin1.dll /bin/cygz.dll /bin/cyggmp-3.dll /bin/cygbz2-1.dll /bin/cygiconv-2.dll /bin/cygintl-2.dll /bin/cygminires.dll"
  8. CYGWINEXE="/bin/tar.exe /bin/mount.exe /bin/umount.exe /bin/unzip.exe"
  9. CWD=`pwd`
  10. echo "Installing ClamAV..."
  11. make install
  12. echo "Copying over the necessary DLL files that make ClamAV Work..."
  13. cp -f -v --remove-destination $DLLFILES $CYGWINEXE $CLAMAV/bin/
  14. #cp -f -v --remove-destination /bin/cygwin1-1.5.16.dll $CLAMAV/bin/cygwin1.dll
  15. #cp -v --remove-destination libclamav/.libs/cygclamav-1.dll-def libclamav/.libs/cygclamav-1.dll-exp $CLAMAV/lib
  16. echo "Converting text files to standard Windows linefeeds..."
  17. mount -t $WINPATH $MNTPATH
  18. #cd ..
  19. for i in $DOCFILES; do
  20.     echo "Converting $i..."
  21.     rm -f $MNTPATH/$i
  22.     awk 1 $i > $MNTPATH/$i
  23. done
  24. umount $MNTPATH
  25. echo "Copying over documentation, example, and contrib directories..."
  26. cp -f --remove-destination -R $DOCDIR $CLAMAV
  27. #cd $CWD
  28. cp --remove-destination -R idletimeout.patch clamav-dll.patch configure-clamav-win32 clamav-install $CLAMAV/sosdg/
  29. find $CLAMAV -name CVS | xargs rm -frv
  30. find $CLAMAV -name ".cvsignore" | xargs rm -frv
  31. find $CLAMAV -name ".\#*" | xargs rm -frv
  32. chown -R Administrators:Users $CLAMAV
  33. echo "Stripping the applications of debugging symbols..."
  34. strip --strip-debug $CLAMAV/bin/{cygz.dll,cyggmp-3.dll,cygbz2-1.dll,cygiconv-2.dll,cygintl-2.dll,cygminires.dll}
  35. strip $CLAMAV/bin/*.exe
  36. cd $CLAMAV/bin
  37. # Dont rebase cygwin1.dll
  38. #ls | grep -v "cygwin1.dll" > files
  39. #rebaseall -T files
  40. #rm -f files
  41. #rebase -b 0x70000000 -v cygwin1.dll
  42. cd $CWD
  43. rm -f $CLAMAV/docs/clam.eps
  44. echo "Done!"
  45.